import { defineApplicationConfig } from '@cs/vite-config';

export default defineApplicationConfig({
  overrides: {
    optimizeDeps: {
      include: [],
    },
    server: {
      host: true,
      port: 3456,
      proxy: {
        ['/api']: {
          target: 'http://localhost:3000',
          changeOrigin: true,
          rewrite: (path) => path.replace(new RegExp(`^/api`), ''),
          // ws: true,
          // secure: false, // only https
        },
      },
      open: false, // 项目启动后，自动打开
      warmup: {
        clientFiles: ['./index.html', './src/{views,components}/*'],
      },
    },
  },
});
